#include "settingsdlg.h"
#include "ui_settingsdlg.h"

SettingsDlg::SettingsDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SettingsDlg)
{
    ui->setupUi(this);

    connect(this, SIGNAL(accepted()),
            this, SLOT(settingsChanged()));
}

SettingsDlg::~SettingsDlg()
{
    delete ui;
}

//void SettingsDlg::idxChanged(QString id) {
//    emit idxChanged(ui->acctComboBox->currentText());
//}

void SettingsDlg::settingsChanged() {
    QString type;
    if(ui->ddaRadioButton->isChecked())
        type = "DDA";
    else
        type = "CCA";

    emit saveMe(ui->acctNrInput->text(),
//                  ui->acctOwnerImput->text(),
                  type,
                  ui->acctCurrencyInput->text());
}
